import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

// 导入BuyerInfo.vue
import buyerInfo from '@/components/BuyerInfo'

// 导入首页Index.vue
import index from '@/components/Index'

// 导入订单页面OrderInfo.vue
import orderInfo from '@/components/OrderInfo'

// 导入购物车界面
import carInfo from '@/components/CarInfo'

// 导入商品分类界面
import productionType from '@/components/productionType'

Vue.use(Router)

export default new Router({

  // 去掉*路径
  mode: 'history',
  routes: [{
    // 买家个人中心页面
    path: '/buyerInfo',
    name: 'BuyerInfo',
    component: buyerInfo
  }, {
    // 商城主页
    path: '/index',
    name: 'Index',
    component: index
  },{
    // 买家订单页面
    path: '/orderInfo',
    name: 'OrderInfo',
    component: orderInfo
  },{
    // 买家购物车界面
    path: '/carInfo',
    name: 'CarInfo',
    component: carInfo
  },{
    // 买家商品分类界面
    path: '/productionType',
    name: 'productionType',
    component: productionType
  }]
})
